package com.sora.sora.server.mapper;

import com.sora.sora.common.model.entity.CommentEntity;
import com.sora.sora.common.model.entity.ReplyEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CommentMapper {

    int addComment(CommentEntity commentEntity);

    int addReply(ReplyEntity replyEntity);

    int delComment(int id);

    int delReply(int id);

    int countComment(String articleType, int articleId);

    int countReply(int commentId);

    List<CommentEntity> listCommentAscTime(String articleType, int articleId);

    List<CommentEntity> listCommentDescTime(String articleType, int articleId);

    List<ReplyEntity> listReplyAscTime(int commentId);

    List<ReplyEntity> listReplyDescTime(int commentId);
}
